package com.crm.uilt;

/*
import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
*/

import java.text.SimpleDateFormat;
import java.util.Date;
/**
 * @author zjd
 * @Title:
 * @Description:
 * @date 2021/4/211:48
 */
public class RestResult {

    private String startTime;
    private int code;
    private String desc;
    private Object data;

    /*public String toJson() {
        JSONObject json;
        JsonConfig config = new JsonConfig();
        config.registerJsonValueProcessor(Date.class, new DateJsonValueProcessor("yyyy-MM-dd HH:mm:ss"));
        json = JSONObject.fromObject(this,config);
        return json.toString();
    }*/

    public RestResult() {
        this.data = "";
        this.desc = "";
        this.code = 0;
        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");// 设置日期格式
        this.startTime = df.format(new Date());// new Date()为获取当前系统时间
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }



}
